#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e3 + 10;
int arr[N], b[N];
int n;
int main()
{
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	for (int i = 0; i < n - 1; i++) {
		b[i] = abs(arr[i] - arr[i + 1]);
	}
	sort(b, b + n - 1);
	for (int i = 1; i <= n - 1; i++) {
		if (b[i - 1] != i) {
			cout << "Not jolly" << endl;
			return 0;
		}
	}
	cout << "Jolly" << endl;
	//for (int i = i; i < n - 1; i++) {
	//	int j = i + 1;
	//	int sub = arr[j] - arr[i];
	//	memset(b, 0, sizeof(b));
	//	for (int k = 1; k < sub; k++) {
	//		
	//	}
	//}
	return 0;
}